<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun: b2IntrusiveListNode Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classb2_intrusive_list_node-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">b2IntrusiveListNode Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="b2_intrusive_list_8h_source.html">b2IntrusiveList.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6584f46e80ffd3dd8a9f1772197b8168"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6584f46e80ffd3dd8a9f1772197b8168"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a6584f46e80ffd3dd8a9f1772197b8168">b2IntrusiveListNode</a> ()</td></tr>
<tr class="memdesc:a6584f46e80ffd3dd8a9f1772197b8168"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the node. <br/></td></tr>
<tr class="separator:a6584f46e80ffd3dd8a9f1772197b8168"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f66f51630fa5caa702ecea85f1ef8d4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f66f51630fa5caa702ecea85f1ef8d4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a6f66f51630fa5caa702ecea85f1ef8d4">~b2IntrusiveListNode</a> ()</td></tr>
<tr class="memdesc:a6f66f51630fa5caa702ecea85f1ef8d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the node is in a list, remove it from the list. <br/></td></tr>
<tr class="separator:a6f66f51630fa5caa702ecea85f1ef8d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39b12145a399a89f66953d114f7b4a52"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a39b12145a399a89f66953d114f7b4a52"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a39b12145a399a89f66953d114f7b4a52">InsertAfter</a> (<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *const node)</td></tr>
<tr class="memdesc:a39b12145a399a89f66953d114f7b4a52"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert this node after the specified node. <br/></td></tr>
<tr class="separator:a39b12145a399a89f66953d114f7b4a52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fb8d19c265f7dc1e9bccc0c3f7987e1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8fb8d19c265f7dc1e9bccc0c3f7987e1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a8fb8d19c265f7dc1e9bccc0c3f7987e1">InsertBefore</a> (<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *const node)</td></tr>
<tr class="memdesc:a8fb8d19c265f7dc1e9bccc0c3f7987e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert this node before the specified node. <br/></td></tr>
<tr class="separator:a8fb8d19c265f7dc1e9bccc0c3f7987e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac889c92042c5aacac9637328aead4b2f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac889c92042c5aacac9637328aead4b2f"></a>
const <a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#ac889c92042c5aacac9637328aead4b2f">GetTerminator</a> () const </td></tr>
<tr class="memdesc:ac889c92042c5aacac9637328aead4b2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the terminator of the list. <br/></td></tr>
<tr class="separator:ac889c92042c5aacac9637328aead4b2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b5decaef6080b7a9c36a6eec957779a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1b5decaef6080b7a9c36a6eec957779a"></a>
<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a1b5decaef6080b7a9c36a6eec957779a">Remove</a> ()</td></tr>
<tr class="memdesc:a1b5decaef6080b7a9c36a6eec957779a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove this node from the list it's currently in. <br/></td></tr>
<tr class="separator:a1b5decaef6080b7a9c36a6eec957779a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34b82d0f39896a0e9579116353f3d222"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a34b82d0f39896a0e9579116353f3d222"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a34b82d0f39896a0e9579116353f3d222">IsEmpty</a> () const </td></tr>
<tr class="memdesc:a34b82d0f39896a0e9579116353f3d222"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine whether this list is empty or the node isn't in a list. <br/></td></tr>
<tr class="separator:a34b82d0f39896a0e9579116353f3d222"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a824cfd5f79cd5dcedfc0dd96add8e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a824cfd5f79cd5dcedfc0dd96add8e2"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a2a824cfd5f79cd5dcedfc0dd96add8e2">InList</a> () const </td></tr>
<tr class="memdesc:a2a824cfd5f79cd5dcedfc0dd96add8e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine whether this node is in a list or the list contains nodes. <br/></td></tr>
<tr class="separator:a2a824cfd5f79cd5dcedfc0dd96add8e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cf61343c461e11e039dc2bce445179a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4cf61343c461e11e039dc2bce445179a"></a>
uint32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a4cf61343c461e11e039dc2bce445179a">GetLength</a> () const </td></tr>
<tr class="memdesc:a4cf61343c461e11e039dc2bce445179a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the length of the list. <br/></td></tr>
<tr class="separator:a4cf61343c461e11e039dc2bce445179a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4b6d6ce35cc688a0a90d236d6ae971b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab4b6d6ce35cc688a0a90d236d6ae971b"></a>
<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#ab4b6d6ce35cc688a0a90d236d6ae971b">GetNext</a> () const </td></tr>
<tr class="memdesc:ab4b6d6ce35cc688a0a90d236d6ae971b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the next node in the list. <br/></td></tr>
<tr class="separator:ab4b6d6ce35cc688a0a90d236d6ae971b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac9ed793771f55613245044fa47f11c33"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac9ed793771f55613245044fa47f11c33"></a>
<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#ac9ed793771f55613245044fa47f11c33">GetPrevious</a> () const </td></tr>
<tr class="memdesc:ac9ed793771f55613245044fa47f11c33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the previous node in the list. <br/></td></tr>
<tr class="separator:ac9ed793771f55613245044fa47f11c33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2040db2f03f83ee4420b4de502164880"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a2040db2f03f83ee4420b4de502164880">ValidateList</a> () const </td></tr>
<tr class="separator:a2040db2f03f83ee4420b4de502164880"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93688489ef91d2145e4df19e5a15f166"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93688489ef91d2145e4df19e5a15f166"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_intrusive_list_node.html#a93688489ef91d2145e4df19e5a15f166">FindNodeInList</a> (<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> *const nodeToFind) const </td></tr>
<tr class="memdesc:a93688489ef91d2145e4df19e5a15f166"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine whether the specified node is present in this list. <br/></td></tr>
<tr class="separator:a93688489ef91d2145e4df19e5a15f166"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> is used to implement an intrusive doubly-linked list.</p>
<p>For example:</p>
<p>class MyClass { public: MyClass(const char &lt;em&gt;msg) : m_msg(msg) {} const char GetMessage() const { return m_msg; } B2_INTRUSIVE_LIST_GET_NODE(m_node); B2_INTRUSIVE_LIST_NODE_GET_CLASS(MyClass, m_node); private: <a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> m_node; const char *m_msg; };</p>
<p>int main(int argc, char &lt;em&gt;argv[]) { <a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> list; // NOTE: type is NOT MyClass MyClass a("this"); MyClass b("is"); MyClass c("a"); MyClass d("test"); list.InsertBefore(a.GetListNode()); list.InsertBefore(b.GetListNode()); list.InsertBefore(c.GetListNode()); list.InsertBefore(d.GetListNode()); for (<a class="el" href="classb2_intrusive_list_node.html">b2IntrusiveListNode</a> node = list.GetNext(); node != list.GetTerminator(); node = node-&gt;<a class="el" href="classb2_intrusive_list_node.html#ab4b6d6ce35cc688a0a90d236d6ae971b" title="Get the next node in the list. ">GetNext()</a>) { MyClass *cls = MyClass::GetInstanceFromListNode(node); printf("%s\n", cls-&gt;GetMessage()); } return 0; } </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2040db2f03f83ee4420b4de502164880"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool b2IntrusiveListNode::ValidateList </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>If B2_INTRUSIVE_LIST_VALIDATE is 1 perform a very rough validation of all nodes in the list. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="b2_intrusive_list_8h_source.html">b2IntrusiveList.h</a></li>
</ul>
</div><!-- contents -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
